<?php
declare(strict_types=1);
//自定义函数的定义及调用
echo "3+4=",sum(x:3,y:4), "\n";
function sum(int|float|string $x,int|float|string $y):int|float|false{
    if($x>=10||$y>=10)return false ;
    return $x+$y;
}
//函数参数、返回值类型及严格模式
echo "3.6+4.8=",sum(x:3.4,y:4.8),"\n";
echo "3.6+4.8=",sum(x:'3.4',y:'4.8'),"\n";
var_dump(sum(x:12,y:9));